[IA64] smp boot speed-up (sal cache flush, itc/itv messages)
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Wed, 26 Apr 2006 04:32:14 +0000 (22:32 -0600)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Wed, 26 Apr 2006 04:32:14 +0000 (22:32 -0600)
Use sal_cache_flush to emulate SAL_CACHE_FLUSH instead of fc.
Only prints one vcpu_set_itc message, do not print set itv message.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
xen/arch/ia64/xen/dom_fw.c
xen/arch/ia64/xen/vcpu.c

index 636031be0917f185150e932e2a6b02063d09dace..ba21f846c57dda91482e6b35409855eaac5717f8 100644 (file)
@@ -222,9 +222,18 @@ sal_emulator (long index, unsigned long in1, unsigned long in2,
                printf("*** CALLED SAL_MC_SET_PARAMS.  IGNORED...\n");
                break;
            case SAL_CACHE_FLUSH:
-               /*  The best we can do is to flush with fc all the domain.  */
-               domain_cache_flush (current->domain, in1 == 4 ? 1 : 0);
-               status = 0;
+               if (1) {
+                       /*  Flush using SAL.
+                           This method is faster but has a side effect on
+                           other vcpu running on this cpu.  */
+                       status = ia64_sal_cache_flush (in1);
+               }
+               else {
+                       /*  Flush with fc all the domain.
+                           This method is slower but has no side effects.  */
+                       domain_cache_flush (current->domain, in1 == 4 ? 1 : 0);
+                       status = 0;
+               }
                break;
            case SAL_CACHE_INIT:
                printf("*** CALLED SAL_CACHE_INIT.  IGNORED...\n");
index 2daba1cdc24229eb4e92e10ec10bea14e1e448d2..2a293b79de98fe899112cdbeb654ceaf01323d57 100644 (file)
@@ -965,13 +965,12 @@ IA64FAULT vcpu_set_lrr1(VCPU *vcpu, UINT64 val)
 
 IA64FAULT vcpu_set_itv(VCPU *vcpu, UINT64 val)
 {
-//extern unsigned long privop_trace;
-//privop_trace=1;
-       if (val & 0xef00) return (IA64_ILLOP_FAULT);
+       /* Check reserved fields.  */
+       if (val & 0xef00)
+               return (IA64_ILLOP_FAULT);
        PSCB(vcpu,itv) = val;
        if (val & 0x10000) {
-               printf("**** vcpu_set_itv(%lu): vitm=%lx, setting to 0\n",
-                      val,PSCBX(vcpu,domain_itm));
+               /* Disable itm.  */
                PSCBX(vcpu,domain_itm) = 0;
        }
        else vcpu_set_next_timer(vcpu);
@@ -1091,7 +1090,12 @@ IA64FAULT vcpu_set_itc(VCPU *vcpu, UINT64 val)
 {
 #define DISALLOW_SETTING_ITC_FOR_NOW
 #ifdef DISALLOW_SETTING_ITC_FOR_NOW
-printf("vcpu_set_itc: Setting ar.itc is currently disabled\n");
+       static int did_print;
+       if (!did_print) {
+               printf("vcpu_set_itc: Setting ar.itc is currently disabled\n");
+               printf("(this message is only displayed one)\n");
+               did_print = 1;
+       }
 #else
        UINT64 oldnow = ia64_get_itc();
        UINT64 olditm = PSCBX(vcpu,domain_itm);